import axios from 'axios';
const api = axios.create({
    baseURL: 'https://api-hmugo-web.itheima.net/api/public/v1',
    timeout: 5000
})

api.interceptors.request.use(config => {
    return config
},err => {
    return Promise.reject(err)
})

api.interceptors.response.use(res => {
    return Promise.resolve(res.data) 
},err => {
    return Promise.reject(err)
})

export default api